<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html 
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <f:view locale="#{localeHelper.current}">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet library="css" name="cssLayout.css"/>
        <title><ui:insert name="title">Awesome Title</ui:insert></title>
    </h:head>
    
    <h:body>

        <div id="top" class="top">
            <ui:insert name="header">
                <h:form>
                    <h1 style="text-align: center"><h:outputText value="#{bundle.mainHeading}" /></h1>
                    <br />
                    <h:commandLink action="index" value="#{bundle.mainPageLink}"/>
                    <h:outputText value=" :: " />
                    <h:commandLink action="search" value="#{bundle.searchLink}"/>
                    <h:outputText value=" :: " />
                    <h:commandLink action="mypage" value="#{bundle.myPageLink}" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value=" :: " rendered="#{request.remoteUser!=null}" />
                    <h:commandLink action="login" value="#{bundle.loginLink}" rendered="#{request.remoteUser==null}" />
                    <h:commandLink action="logout" value="#{bundle.logoutLink} #{request.remoteUser}" rendered="#{request.remoteUser!=null}" />
                    <h:outputText value=" :: " rendered="#{request.remoteUser!=null}" />
                    <h:commandLink action="#{usersController.prepareChangePassword}" value="#{bundle.changePasswordLink}" rendered="#{request.remoteUser!=null}" />

                    <span style="position: absolute; right: 5px">
                    <h:commandLink action="#{localeHelper.setEnglishLocale}" rendered="#{localeHelper.norwegianSet}" value="#{bundle.en}" immediate="true"/>
                    <h:commandLink action="#{localeHelper.setNorwegianLocale}" rendered="#{localeHelper.englishSet}" value="#{bundle.no}" immediate="true"/>
                    </span>
                </h:form>
            </ui:insert>
        </div>
        
        <div id="content" class="center_content">
            <ui:insert name="content">Content</ui:insert>
        </div>
        
    </h:body>
    </f:view>
</html>
